/**
 * 
 */
package com.sci.web.action.datareportseason;

import javax.annotation.Resource;

import com.sci.web.action.util.BaseAction;
import com.sci.web.bean.Enterprise_Research;
import com.sci.web.dao.DataReportM_ReaearchDao;

/**
 * @author  BaiFuyou
 * @date: Nov 4, 2011 8:54:10 PM
 * 
 * 更新企业研究机构数据
 */
public class UpdateEnterpriseReaearchById_BaseInfoAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2891563489652073058L;
	@Resource
	private DataReportM_ReaearchDao dataReportM_ReaearchDao;
	private int rid;
	private int eid;
	private int research_built_type;
	private String research_name ;
	private String research_built_date;
	private int research_authentication_type;
	private int research_persons;
	/**
	 * @return the research_built_type
	 */
	public int getResearch_built_type() {
		return research_built_type;
	}
	/**
	 * @param research_built_type the research_built_type to set
	 */
	public void setResearch_built_type(int research_built_type) {
		this.research_built_type = research_built_type;
	}
	/**
	 * @return the research_name
	 */
	public String getResearch_name() {
		return research_name;
	}
	/**
	 * @param research_name the research_name to set
	 */
	public void setResearch_name(String research_name) {
		this.research_name = research_name;
	}
	/**
	 * @return the research_built_date
	 */
	public String getResearch_built_date() {
		return research_built_date;
	}
	/**
	 * @param research_built_date the research_built_date to set
	 */
	public void setResearch_built_date(String research_built_date) {
		this.research_built_date = research_built_date;
	}
	/**
	 * @return the research_authentication_type
	 */
	public int getResearch_authentication_type() {
		return research_authentication_type;
	}
	/**
	 * @param research_authentication_type the research_authentication_type to set
	 */
	public void setResearch_authentication_type(int research_authentication_type) {
		this.research_authentication_type = research_authentication_type;
	}
	/**
	 * @return the research_persons
	 */
	public int getResearch_persons() {
		return research_persons;
	}
	/**
	 * @param research_persons the research_persons to set
	 */
	public void setResearch_persons(int research_persons) {
		this.research_persons = research_persons;
	}
	/**
	 * @return the rid
	 */
	public int getRid() {
		return rid;
	}
	/**
	 * @param rid the rid to set
	 */
	public void setRid(int rid) {
		this.rid = rid;
	}
	/**
	 * @return the eid
	 */
	public int getEid() {
		return eid;
	}
	/**
	 * @param eid the eid to set
	 */
	public void setEid(int eid) {
		this.eid = eid;
	}
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		super.setContentType(super.JSON);
		Enterprise_Research er = new Enterprise_Research();
		er.setEnterprise_id(eid);
		er.setResearch_id(rid);
		er.setResearch_authentication_type(research_authentication_type);
		er.setResearch_built_date(research_built_date.substring(0, 10));
		er.setResearch_name(research_name);
		er.setResearch_persons(research_persons);
		er.setResearch_built_type(research_built_type);
		if(dataReportM_ReaearchDao.updateEnterpriseResearchById(er)){
			super.outPrint("ok");
		}else{
			super.outPrint("fail");
		}
		return "json";
	}
}
